package com.drerp.integracao.service;

public class MedicosServiceProxy implements com.drerp.integracao.service.MedicosService {
  private String _endpoint = null;
  private com.drerp.integracao.service.MedicosService medicosService = null;
  
  public MedicosServiceProxy() {
    _initMedicosServiceProxy();
  }
  
  public MedicosServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initMedicosServiceProxy();
  }
  
  private void _initMedicosServiceProxy() {
    try {
      medicosService = (new com.drerp.integracao.service.MedicosServiceServiceLocator()).getMedicosServicePort();
      if (medicosService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)medicosService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)medicosService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (medicosService != null)
      ((javax.xml.rpc.Stub)medicosService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.drerp.integracao.service.MedicosService getMedicosService() {
    if (medicosService == null)
      _initMedicosServiceProxy();
    return medicosService;
  }
  
  public com.drerp.integracao.service.Medico[] getMedicos() throws java.rmi.RemoteException{
    if (medicosService == null)
      _initMedicosServiceProxy();
    return medicosService.getMedicos();
  }
  
  
}